package com;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Properties;
import java.util.Scanner;

public class ciba {
    public static void main(String[] args) throws IOException {
        Properties pp = new Properties();
        String path = "HomeWork15\\dir\\ciba.properties";
        InputStreamReader isr = new InputStreamReader(new FileInputStream(path), "gbk");


        pp.load(isr);
        isr.close();

        Scanner sc = new Scanner(System.in);
        System.out.println("请输入您要查找的单词:");
        String word = sc.nextLine();

        String value = pp.getProperty(word);

        value = (value == null) ? "请给我的支付宝转10美元" : value;
        System.out.println(value);
    }
}
